﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CreatingTypes
{
    internal class _03InstanceConstructors
    {
        string? _name;

        string? _name2;
        //构造函数
        public _03InstanceConstructors(string name)
        {
            this._name = name;
        }

        public _03InstanceConstructors(string name1, string name2) : this(name1)
        {
            _name2 = _name + "调用了第一个构造函数" + name2;
        }

        public void ShowName() => Console.WriteLine(this._name);

        public void ShowName2() => Console.WriteLine(this._name2);
    }
}
